/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package ufpr.ees.suhck.model;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import org.hibernate.validator.constraints.Email;

@Entity
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
public abstract class Usuario implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.TABLE)
    protected Long id;

    @NotNull
    @Size(max = 255, message = "Nome do médico deve ter no máximo {max} caracteres.")
    @Column(nullable = false, length = 255)
    protected String nome;

    @NotNull
    @Size(max = 15, message = "CPF deve ter no máximo {max} caracteres.")
    @Column(nullable = false, length = 15, unique = true)
    protected String cpf;

    @NotNull    
    @Size(max = 255, message = "E-mail deve ter no máximo {max} caracteres.")
    @Column(nullable = false, unique = true)
    protected String email;

    @Column(nullable = false, length = 64)
    protected String senha;

    @Size(max = 255, message = "Endereço deve ter no máximo {max} caracteres.")
    protected String endereco;

    @Size(max = 25, message = "Telefone deve ter no máximo {max} caracteres.")
    @Column(length = 25)
    protected String telefone;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getNome() {
        return nome;
    }

    public void setNome(String nome) {
        this.nome = nome;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getSenha() {
        return senha;
    }

    public void setSenha(String senha) {
        this.senha = senha;
    }

    public String getCpf() {
        return cpf;
    }

    public void setCpf(String cpf) {
        this.cpf = cpf;
    }

    public String getEndereco() {
        return endereco;
    }

    public void setEndereco(String endereco) {
        this.endereco = endereco;
    }

    public String getTelefone() {
        return telefone;
    }

    public void setTelefone(String telefone) {
        this.telefone = telefone;
    }

}
